﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<CourseSystem.Core.Entities.CommonResourcesInfo>" %>

<%@ Import Namespace="CourseSystem.Common.Helpers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    文本资源编辑
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <% using (Html.BeginForm("CommonEdit","AdminResources",new{Model.Id},FormMethod.Post))
       {%>
    <fieldset>
        <%=Html.HiddenFor(o=>o.Type) %>
        <div class="editor-label">
            <div class="editor-label">
                <%: Html.LabelFor(model => model.MinType) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(model => model.MinType, ResourcesHelper.GetTextType())%>
                <%: Html.ValidationMessageFor(model => model.MinType)%>
            </div>
            <%: Html.LabelFor(model => model.Title) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.Title) %>
            <%: Html.ValidationMessageFor(model => model.Title) %>
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.Author) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.Author) %>
            <%: Html.ValidationMessageFor(model => model.Author) %>
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.Message) %>
        </div>
        <div class="editor-field">
            <%: Html.TextAreaFor(model => model.Message, new { @class = "editArea" })%>
            <%: Html.ValidationMessageFor(model => model.Message)%>
        </div>
        <p>
            <input type="submit" value="保存" /><%=Html.ActionButton("返回", "Common",new{type=1})%>
        </p>
    </fieldset>
    <% } %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
    <script type="text/javascript">
        $(function () {
            bindTextOnlyAreaEditor('Message');
        });
    </script>
</asp:Content>
